<?php

require_once 'ConnectPDO.php';
class SearchSFXY extends ConnectPDO
{
    public function user_selectName($userName){
        $sql='select * from student where name=?';
        $stm=$this->pdo->prepare($sql);
        $stm->bindParam(1,$userName);
        $stm->execute();
        $result=$stm->fetchAll();
        return $result;
    }

    public function user_selectID($userID){
        $sql='select * from student where no=?';
        $stm=$this->pdo->prepare($sql);
        $stm->bindParam(1,$userID);
        $stm->execute();
        $result=$stm->fetchAll();
        return $result;
    }
}